import request from "@/config/axios/service";

/**
 *  导出交互配置表
 */
export function exportExcel() {
  return request({
    url: `/ProductDataSetting/ExportExcel`,
    method: "get",
    header: {
      headers: { "Content-Type": "application/x-download" },
    },
    responseType: "blob",
  });
}

/**
 *  导入交互配置表
 */
export function importExcel(data) {
  return request({
    url: `/ProductDataSetting/ImportExcel`,
    method: "post",
    headers: { "Content-Type": "multipart/form-data" },
    data,
  });
}

export function geDataSetting(params) {
  return request({
    url: "/ProductDataSetting",
    method: "get",
    params,
  });
}
export function getLoadChild(url, params) {
  return request({
    url: url,
    method: "get",
    params,
  });
}

// 密码验证
export function verifyParamsPwd(params) {
  return request({
    url: `/User/password/verify/${params}`,
    method: "get",
  });
}

export function getConifg(params) {
  return request({
    url: `/SystemSetting/GetPageList`,
    method: "get",
  });
  params;
}
export function postConifg(data) {
  return request({
    url: `/SystemSetting/Add`,
    method: "post",
    data,
  });
}
export function putConifg(data) {
  return request({
    url: `/SystemSetting/Update`,
    method: "put",
    data,
  });
}
export function delConifg(data) {
  return request({
    url: `/SystemSetting/Delete`,
    method: "DELETE",
    data,
  });
}

/**
 *  参数配置同步配置
 */
export function SyncDataSetting() {
  return request({
    method: "get",
    url: `/ProductDataSetting/SyncDataSetting`,
  });
}

// 获取参数类型列表
export function GetParamList() {
  return request({
    method: "get",
    url: `/MesInterfaceParamSetting/GetParamTypeList`,
  });
}
//获取字典参数
export function getDicType(params) {
  return request({
    method: "get",
    url: `/Dictionary`,
    params,
  });
}
